var web3 = new Web3(new Web3.providers.HttpProvider("http://127.0.0.1:8545"));
        document.querySelectorAll("input")[0].onclick=function(){
             //使用web3 的api 去操作节点。jsonrpc
            web3.eth.getAccounts(function(error,result){
                console.log(result);
            });
        };
        document.querySelectorAll("input")[1].onclick=function(){
            web3.personal.newAccount("123456",function(error,result){
                console.log(result);
            });
        };
        document.querySelectorAll("input")[2].onclick=function(){
            web3.personal.unlockAccount("0x795ddf1c49cb9020593b2240443ce109adfca024","123456",function(error,result){
                console.log(result);
                console.log("解绑成功");
            });
        };

        var user1 = "0xd74cd9732d5ecc449ee39ad33007e5504eab7e92";
        var user2 = "0x795ddf1c49cb9020593b2240443ce109adfca024";

        document.querySelectorAll("input")[3].onclick=function(){
            web3.eth.sendTransaction({from:user1,to:user2,value:"100"}, function(error,result){
                console.log(result);
                console.log("转账成功");
            });
        };
        document.querySelectorAll("input")[4].onclick=function(){
            web3.eth.getBalance("0xd74cd9732d5ecc449ee39ad33007e5504eab7e92",function(error,result){
                console.log(result);
                console.log("获取余额成功");
            });
        };